<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="./template/TCubeTemplate.xhtml">
    <ui:define name="begin">
        <f:view beforePhase="#{redemptionManagerBean.initListOfRedemptionList}"></f:view>
    </ui:define>
    <ui:define name="contentInsert">
    
        <h:body>
            <h:form id="formMain">
                <h1>TCube View All Redemption Lists</h1>
                <p:panel header="View All Redemption list">
                    <p:dataTable var="list" value="#{redemptionManagerBean.listOfRedemptionList}" paginator="true" 
                                 rows="10" emptyMessage="No Redemption List" selection="#{redemptionManagerBean.selectedRedemptionList}" 
                                 selectionMode="single" rowSelectListener="#{redemptionManagerBean.onRowSelectNavigateRedemptionList}"
                                 dblClickSelect="true">

                        <p:column sortBy="#{list.id}" filterBy="#{list.id}">
                            <f:facet name="header">
                                <h:outputText value="ID" />
                            </f:facet>
                            <h:outputText value="#{list.id}" />
                        </p:column>
                        <p:column sortBy="#{list.description}" filterBy="#{list.description}">
                            <f:facet name="header">
                                <h:outputText value="Description" />
                            </f:facet>
                            <h:outputText value="#{list.description}" />
                        </p:column>
                        <p:column sortBy="#{list.dateCreated}" filterBy="#{list.dateCreated}">
                            <f:facet name="header">
                                <h:outputText value="Date created" />
                            </f:facet>
                            <h:outputText value="#{list.dateCreated}" />
                        </p:column>
                    </p:dataTable>
                </p:panel>
            </h:form>
        </h:body>
    </ui:define>
</ui:composition>